\pdfcompresslevel=0
\documentclass[a4paper]{article}

\usepackage{pgfplots}

\begin{document}


\begin{tikzpicture}
%\tracingcommands=2\tracingmacros=2
    \begin{axis}[
		mesh/color input=explicit,
		shader=interp,
	]
    \addplot[patch]
    table[meta=c] {
        x y c
        0 0 color=red
        1 1 0,0,1
        2 0 color=green

        1 1 color=yellow
        2 0 gray=0.5
        3 1 cmyk=1,0,0,0

        2 0 rgb255=0,0,255
        3 1 color=yellow
        4 0 color=red
    };
    \end{axis}
\end{tikzpicture}

\end{document}

